import { defineConfig } from "vite";
// import type { ModuleFormat } from "./node_modules/.pnpm/rollup@4.13.0/node_modules/rollup";
export default defineConfig({
    build: {
        minify: false,
        emptyOutDir: false,
        lib: {
            entry: "./src/index.ts",
            name: "ts-go",
            fileName: function (formatter, entryName) {
                return `${entryName}.js`;
            },
            formats: ["cjs"],
        },
        rollupOptions: {
            external: ["utils", "request"],
            output: {
                dir: "./",
                preserveModules: true,
            },
        },
    },
});
